<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        padding: 0;
        margin: 0;
        box-sizing: border-box;
      }

      body {
        width: 100vw;
        height: 100vh;
        background: #2c3e50;
        display: flex;
        justify-content: center;
        align-items: center;
      }

      main {
        position: absolute;
        width: 400px;
        height: 200px;
        left: 50%;
        top: 50%;
        transform-style: preserve-3d;
        transform-origin: center center -300px;
        transform: translate(-50%, -50%) rotateX(-45deg);
      }

      main:hover {
        transform: translate(-50%, -50%) rotateX(-45deg) rotateY(900deg);
      }
      div {
        position: absolute;
        width: 100%;
        height: 100%;
        transform-origin: center center -300px;
      }

      div img {
        width: 100%;
        height: 100%;
      }

      div:nth-child(1) {
        transform: rotateY(60deg);
      }

      div:nth-child(2) {
        transform: rotateY(120deg);
      }

      div:nth-child(3) {
        transform: rotateY(180deg);
      }

      div:nth-child(4) {
        transform: rotateY(240deg);
      }

      div:nth-child(5) {
        transform: rotateY(280deg);
      }

      div:nth-child(6) {
        transform: rotateY(320deg);
      }

      div:nth-child(7) {
        transform: rotateY(360deg);
      }
    </style>
  </head>
  <body>
    <main>
      <div><img src="images/1.jpg" alt="" /></div>
      <div><img src="images/2.jpg" alt="" /></div>
      <div><img src="images/3.jpg" alt="" /></div>
      <div><img src="images/1.jpg" alt="" /></div>
      <div><img src="images/2.jpg" alt="" /></div>
      <div><img src="images/3.jpg" alt="" /></div>
      <div><img src="images/3.jpg" alt="" /></div>
    </main>
  </body>
</html>
